ODTranslation
- Superclasses
ODObject
- Subclasses
- none
An object of the
ODTranslation
class provides data translation services for OpenDoc documents and their parts.Description
TheODTranslation
class depends on platform-specific system services to provide OpenDoc data translation. OpenDoc uses translation objects to maintain information on what kinds of translations are available to the user. OpenDoc and part editors can also use the translation object to perform any requested translations, rather than directly calling the underlying platform-specific services.When a document is opened, the session object creates a single translation object. All parts of the document share the translation object; you can obtain a reference to it by calling the session object's
GetTranslation
method (page 610).The translation service can be triggered when a part does not know how to handle data of an unfamiliar type (for example, when a user initiates linking or importing data from clipboard or drag-and-drop objects). The part can ask the translation object to translate the data into a recognizable format (part kind). Similarly, OpenDoc can initiate translation when opening a part on a system in which no part editor can directly read the part's data.
OpenDoc does not use platform types (for example,
OSType
on the Mac OS). Therefore, to interoperate between OpenDoc and non-OpenDoc systems, platform types and ISO types need to be translated from one kind to the other. If you have part data expressed as a Mac OS file type and need to express it as a part kind (ISO string), you can use the translation object'sGetISOTypeFromPlatformType
method (page 790) to find out if there is a part kind equivalent to that file type. To convert in the opposite direction, use the translation object'sGetPlatformTypeFromISOType
method (page 792) instead.For more information related to data translation, see the chapter on data transfer in the
OpenDoc Programmer's Guide for the MacOS . Methods
This section presents summary descriptions of theODTranslation
methods grouped according to purpose, followed by detailed descriptions in alphabetical order.Translation Availability
Translating
GetTranslationOf
- Returns a type list to which the specified value type can be translated.
CanTranslate
- Indicates whether translation is possible from the specified value type.
Type Conversion
Translate
- Tries to translate the specified source data to the specified value type.
TranslateView
- Translates the content of the source storage-unit view and stores the translated data in the destination storage-unit view.
GetISOTypeFromPlatformType
- Returns the ISO type corresponding to the specified platform-specific type.
GetPlatformTypeFromISOType
- Returns the platform-specific type corresponding to the specified ISO type.
Methods
CanTranslate
GetISOTypeFromPlatformType
GetPlatformTypeFromISOType
GetTranslationOf
Translate
TranslateView
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help